package com.hfi.aop;

import com.hfi.aop2.BlankDisc;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;

import java.util.ArrayList;
import java.util.List;

/**
 * @author ChangLiang
 * @date 2019/6/6
 */
@Configuration
@EnableAspectJAutoProxy
public class AopConfig {

    @Bean
    public BlankDisc blankDisc() {
        BlankDisc blankDisc = new BlankDisc();
        blankDisc.setTitle("Sgt. Pepper's Lonely Hearts Club Band");
        blankDisc.setArtist("The Beatles");
        List<String> list = new ArrayList<>();
        list.add("Sgt. Pepper's Lonely Hearts Club Band");
        list.add("With a Little Help from My Friends");
        list.add("Lucy in the Sky with Diamonds");
        list.add("Getting Better");
        list.add("Fixing a Hole");
        list.add("She's Leaving Home");
        list.add("Being for the Benefit of Mr. Kite!");
        list.add("Within You Without You");
        blankDisc.setTracks(list);
        return blankDisc;
    }
}
